repo.or.cz
/
andmenj-acm.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Namespacing everything to /UVa.
[andmenj-acm.git]
/
UVa
/
11332 - Summing digits
/
11332.cpp
blob
6f7dd6c8298f4a1539489640f4721c28eeb80d53
1
#include <iostream>
2
using namespace
std
;
3
4
int
main
(){
5
unsigned int
n
;
6
while
(
cin
>>
n
&&
n
)
7
cout
<< (
n
%
9
>
0
?
n
%
9
:
9
) <<
endl
;
8
return
0
;
9
}